package com.qingke.oo;

public class Point3D extends Point2D{
	private float z = 0;
	public Point3D(float x,float y,float z){
		super(x,y);
		this.z = z;
	}
	
	public Point3D(){
		super();
	}
	
	public float getZ(){
		return z;
	}
	
	public void setZ(float z){
		this.z = z;
	}
	
	public void setXYZ(float x,float y,float z){
		this.setXY(x, y);
		this.z = z;
	}
	
	public void getXYZ(){
		float[] i = new float [3];
		i[0] = this.getX();
		i[1] = this.getY();
		i[2] = z;
	}
	
	public String toString(){
		return "("+this.getX()+","+this.getY()+","+z+")";
	}
}
